// AddinFrameworkDoc.cpp : implementation of the CAddinFrameworkDoc class
//

#include "stdafx.h"
#include "AddinFramework.h"

#include "AddinFrameworkDoc.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#endif


// CAddinFrameworkDoc

IMPLEMENT_DYNCREATE(CAddinFrameworkDoc, CDocument)

BEGIN_MESSAGE_MAP(CAddinFrameworkDoc, CDocument)
END_MESSAGE_MAP()

BEGIN_DISPATCH_MAP(CAddinFrameworkDoc, CDocument)
END_DISPATCH_MAP()

// Note: we add support for IID_IAddinFramework to support typesafe binding
//  from VBA.  This IID must match the GUID that is attached to the 
//  dispinterface in the .IDL file.

// {58C490C5-40BD-435C-8859-0E5939B9E73D}
static const IID IID_IAddinFramework =
{ 0x58C490C5, 0x40BD, 0x435C, { 0x88, 0x59, 0xE, 0x59, 0x39, 0xB9, 0xE7, 0x3D } };

BEGIN_INTERFACE_MAP(CAddinFrameworkDoc, CDocument)
	INTERFACE_PART(CAddinFrameworkDoc, IID_IAddinFramework, Dispatch)
END_INTERFACE_MAP()


// CAddinFrameworkDoc construction/destruction

CAddinFrameworkDoc::CAddinFrameworkDoc()
{
	// TODO: add one-time construction code here

	EnableAutomation();

	AfxOleLockApp();
}

CAddinFrameworkDoc::~CAddinFrameworkDoc()
{
	AfxOleUnlockApp();
}

BOOL CAddinFrameworkDoc::OnNewDocument()
{
	if (!CDocument::OnNewDocument())
		return FALSE;

	// TODO: add reinitialization code here
	// (SDI documents will reuse this document)

	return TRUE;
}




// CAddinFrameworkDoc serialization

void CAddinFrameworkDoc::Serialize(CArchive& ar)
{
	if (ar.IsStoring())
	{
		// TODO: add storing code here
	}
	else
	{
		// TODO: add loading code here
	}
}


// CAddinFrameworkDoc diagnostics

#ifdef _DEBUG
void CAddinFrameworkDoc::AssertValid() const
{
	CDocument::AssertValid();
}

void CAddinFrameworkDoc::Dump(CDumpContext& dc) const
{
	CDocument::Dump(dc);
}
#endif //_DEBUG


// CAddinFrameworkDoc commands
